<div class="meeting main">
  <div class="pa-form-container shadowbox">
    <div class="container-header">安全会议</div>
    <div class="pa-form-content">
      <form class="clear" name="queryForm" novalidate>
        <div class="row row-top">
          <div class="pa-form-control fl">
            <label for="timer">时间：</label>
            <input type="text" name="startTime" required
              ng-datepicker
              ng-model="meeting.queryData.startTime" />
            到
            <input type="text" name="endTime" required
              ng-datepicker
              ng-model="meeting.queryData.endTime" />
          </div>
          <div class="pa-form-control fl">
            <label for="area">组织单位：</label>
            <select id="type" name="type" class="pa-input-select" 
              style="width:188px;"
              ng-model="meeting.queryData.orgUnit">
              <option value=""></option>
              <option value="{{::item.orgUnitId}}"
                ng-repeat="item in meeting.orgList">{{::item.orgUnitName}}</option>
            </select>
          </div>
          <div class="pa-form-control fl">
            <label for="area">主题：</label>
            <input type="text"
              ng-model="meeting.queryData.meetingTopic" />
          </div>
        </div>
        <a class="pa-float-btn reset-btn"
          ng-click="meeting.reset()">
          <i class="fa fa-repeat"></i>
          <span class="ml5">重置</span>
        </a>
        <a class="pa-float-btn btn" 
          ng-click="meeting.search(queryForm)">
          <i class="fa fa-search"></i>
          <span class="ml5">查询</span>
        </a>
      </form>
    </div>
  </div>
  <div class="pa-table-container shadowbox">
    <div class="operation-bar">
      <a class="pa-float-btn huiyi" ng-click="meeting.addMeeting()">
        新增会议
      </a>
      <div class="table-outer" style="margin-top: 14px;">
        <form class="base-info">
          <table class="pa-table">
            <thead>
              <tr>
                <th>主题</th>
                <th>组织单位</th>
                <th>类型</th>
                <th class="time-sequence">
                  <div>时间</div>
                  <div class="time-sequence-btn">
                    <div class="time-sequence-box"
                      ng-click="meeting.up('meeting_start_date','0')">
                      <i class="fa fa-caret-up"></i>
                    </div>
                    <div class="time-sequence-box"
                      ng-click="meeting.up('meeting_start_date','1')">
                      <i class="fa fa-caret-down"></i>
                    </div> 
                  </div>
                </th>
                <th>地点</th>
                <th>参会人员</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
              <tr ng-repeat="item in meeting.meetingList">
                <td>{{item.meetingTopic}}</td>
                <td>{{item.orgUnit}}</td>
                <td>{{item.meetingType}}</td>
                <td>{{item.meetingStartDate1}}</td>
                <td>{{item.meetingPlace}}</td>
                <td>{{item.participants}}</td>             
                <td>
                  <div class="edit-item fl del"
                    authorization-btn="api/securityactivities/securityMeeting/queryById"
                    ng-click="meeting.meetingDetailView(item)">
                    <i class="fa fa-street-view color"></i>
                    <span>查看</span>
                  </div>
                  <div class="edit-item fl del meet-margin"
                    authorization-btn="api/securityactivities/securityMeeting/queryById"
                    ng-click="meeting.meetingDetailDialog(item);">
                    <i class="fa fa-pencil color"></i>
                    <span>编辑</span>
                  </div>
                  <div class="edit-item fl del"
                    authorization-btn="api/securityactivities/securityMeeting/deleteByPrimaryKey"
                    ng-click="meeting.deleteMeetingItem(item.securityMeetingId)">
                    <i class="fa fa-trash color"></i>
                    <span>删除</span>
                  </div>
                </td>
              </tr>
            </tbody>
          </table> 
        </form>
        <div class="total-num">
          共计<span class="total-num-colorful">
          {{meeting.paginationData.total}}</span>条
        </div>
        <div class="pagination-outer">
          <uib-pagination
            total-items="meeting.paginationData.total"
            ng-model="meeting.paginationData.pageNum"
            items-per-page="meeting.paginationData.pageSize"
            ng-change="pageChange()"
            class="pagination-sm"
            boundary-link-numbers="true"
            max-size="5"
            next-text="下一页"
            previous-text="上一页"></uib-pagination>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 新增安全会议 -->
<script type="text/ng-template" id="addMeeting">
  <div class="item-detail-dialog training-tech">  
    <div class="item-detail-dialog-header"> 
      <div class="title-txt">
        <span>新增安全会议</span> 
      </div>
    </div>  
    <div class="item-detail-dialog-content">
      <form name="addForm" novalidate>
        <div class="row-item">
          <div class="fixed-left-label">
            <label for="name"><b>*</b>会议主题:</label>
          </div>
          <div class="right-value">
            <input type="text" name="meetingTopic" required 
              ng-model="meetingAddition.meetingAdditionList.meetingTopic" />
          </div>         
          <span class="error-tip"
            ng-show="(addForm.$submitted || addForm.meetingTopic.$dirty) && addForm.meetingTopic.$error.required">
            必填
          </span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label">
            <label for="org"><b>*</b>组织单位:</label>
          </div>
          <div class="right-value">
            <select id="type" name="orgUnit" required 
              class="pa-input-select" style="width:188px;"
              ng-model="meetingAddition.meetingAdditionList.orgUnitId">
              <option value=""></option>
              <option value="{{::item.orgUnitId}}"
                ng-repeat="item in meetingAddition.orgList">
                {{::item.orgUnitName}}
              </option>
            </select>
          </div>
          <span class="error-tip"
            ng-show="(addForm.$submitted || addForm.orgUnit.$dirty) && addForm.orgUnit.$error.required">
            必填
          </span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label">
            <label for="types"><b>*</b>会议类型</label>
          </div>
          <div class="right-value">
            <input type="text" name="meetingType" required
              ng-model="meetingAddition.meetingAdditionList.meetingType"/>
          </div>
          <span class="error-tip"
            ng-show="(addForm.$submitted || addForm.meetingType.$dirty) && addForm.meetingType.$error.required">
            必填
          </span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label">
            <label for="timer"><b>*</b>会议时间:</label>
          </div>
          <div class="right-value">
            <input type="text" name="meetingStartDate" required 
              ng-datepicker
              ng-model="meetingAddition.meetingAdditionList.meetingStartDate" />
          </div>
          <span class="error-tip"
            ng-show="(addForm.$submitted || addForm.meetingStartDate.$dirty) && addForm.meetingStartDate.$error.required">
            必填
          </span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label">
            <label for="site"><b>*</b>会议地点:</label>
          </div>
          <div class="right-value">
            <input type="text" name="meetingPlace" required 
              ng-model="meetingAddition.meetingAdditionList.meetingPlace" />
          </div>
          <span class="error-tip"
            ng-show="(addForm.$submitted || addForm.meetingPlace.$dirty) && addForm.meetingPlace.$error.required">
            必填
          </span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label">
            <label for="name">主持人:</label>
          </div>
          <div class="right-value">
            <input name="name" type="text"
              ng-model="meetingAddition.meetingAdditionList.host" />
          </div>
        </div>
        <div class="row-item">
          <div class="fixed-left-label">
            <label for="name">参加人员:</label>
          </div>
          <div class="right-value">
            <input type="text" name="participants" 
              ng-model="meetingAddition.meetingAdditionList.participants" />
          </div>
        </div>
        <common-attachment-upload
          component-id="cp2"
          pick-btn-id="avatar_attachment_picker"
          upload-url="{{fileUploadUrl.securityMeeting}}/"
          file-list="meetingAddition.profilesToken"></avatar-attachment-upload>
      </form>
    </div> 
    <div class="item-detail-dialog-footer btn-outer">
      <a class="pa-btn"
        authorization-btn="api/securityactivities/securityMeeting/insertSecurityMeeting" 
        ng-click="meetingAddition.save(addForm)">
        <i class="fa fa-search"></i>
        <span class="ml5">保存</span>
      </a>
      <a class="pa-btn reset-btn" ng-click="meetingAddition.reset()">
        <i class="fa fa-repeat"></i>
        <span class="ml5">重置</span>
      </a>
    </div>  
  </div> 
</script>

<!-- 查看会议详情 -->
<script type="text/ng-template" id="meetingDetail">
  <div class="item-detail-dialog training-tech">
    <div class="item-detail-dialog-header">
      <div class="title-txt">
        <span>安全会议详情</span>
      </div>
    </div>
    <div class="item-detail-dialog-content">
      <div class="row-item">
        <div class="fixed-left-label">会议主题：</div>
        <div class="right-value meeting-detail">
          {{vm.meetingList.meetingTopic}}
        </div>
      </div>
      <div class="row-item">
        <div class="fixed-left-label">组织单位：</div>
        <div class="right-value meeting-detail">
          {{vm.meetingList.orgUnit}}
        </div>
      </div>
      <div class="row-item">
        <div class="fixed-left-label">会议类型：</div>
        <div class="right-value meeting-detail">
          {{vm.meetingList.meetingType}}
        </div>
      </div>
      <div class="row-item">
        <div class="fixed-left-label">会议时间：</div>
        <div class="right-value meeting-detail">
          {{vm.meetingList.meetingStartDate1}}
        </div>
      </div>
      <div class="row-item">
        <div class="fixed-left-label">会议地点：</div>
        <div class="right-value meeting-detail">
          {{vm.meetingList.meetingPlace}}
        </div>
      </div>
      <div class="row-item">
        <div class="fixed-left-label">主持人：</div>
        <div class="right-value meeting-detail">
          {{vm.meetingList.host}}
        </div>
      </div>
      <div class="row-item">
        <div class="fixed-left-label">参加人员：</div>
        <div class="right-value meeting-detail">
          {{vm.meetingList.participants}}
        </div>
      </div>
      <!-- 展示文件列表 -->
      <!--  ng-show="!meetingDetail.editable" -->
      <div class="avatar-attachment-upload-outer" 
        style="float: left;width: 100%;padding-left: 41px;margin-top: 0;">
        <div class="file-list-outer">
          <div class="file-item" ng-repeat="item in vm.meetingList.fileBeanList">
            <span class="upload-file-name">{{item.fileName}}</span>
            <a class="pa-btn"
              ng-click="vm.preview(item, archiveDetail)">预览</a>
            <a class="pa-btn file-del-btn" target="_blank" 
              ng-href="{{vm.getDownloadSrc(item)}}">
                下载
            </a>
          </div>
        </div>      
      </div>
    </div>
  </div>
</script>

<!-- 编辑会议详情 -->
<script type="text/ng-template" id="meetingDetailList">
  <div class="item-detail-dialog training-tech">
    <div class="item-detail-dialog-header">
      <div class="title-txt">
        <span>编辑安全会议</span>
      </div>
    </div>
    <div class="item-detail-dialog-content">
      <form name="editForm" novalidate>
        <div class="row-item">
          <div class="fixed-left-label"><b>*</b>会议主题：</div>
          <div class="right-value">
            <input type="text" name="meetingTopic" required 
            ng-model="meetingDetail.editMeetingList.meetingTopic" />
          </div>
          <span class="error-tip"
            ng-show="(editForm.$submitted || editForm.meetingTopic.$dirty) && editForm.meetingTopic.$error.required">
            必填
          </span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label"><b>*</b>组织单位：</div>
          <div class="right-value">
            <select name="orgUnitId" required 
              class="pa-input-select" style="width:188px;"
              ng-model="meetingDetail.editMeetingList.orgUnitId">
              <option value="{{::item.orgUnitId}}"
                ng-repeat="item in meetingDetail.orgList"
                ng-selected="meetingDetail.editMeetingList.orgUnitId == item.orgUnitId">
                {{::item.orgUnitName}}
              </option>
            </select>
          </div>
          <span class="error-tip"
            ng-show="(editForm.$submitted || editForm.orgUnitId.$dirty) && editForm.orgUnitId.$error.required">
            必填
          </span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label"><b>*</b>会议类型：</div>
          <div class="right-value">
            <input type="text" name="meetingType" required 
              ng-model="meetingDetail.editMeetingList.meetingType" />
          </div>
          <span class="error-tip"
            ng-show="(editForm.$submitted || editForm.meetingType.$dirty) && editForm.meetingType.$error.required">
            必填
          </span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label"><b>*</b>会议时间：</div>
          <div class="right-value">
            <input type="text" ng-datepicker name="meetingStartDate1" required 
              ng-model="meetingDetail.editMeetingList.meetingStartDate1" />
          </div>
          <span class="error-tip"
            ng-show="(editForm.$submitted || editForm.meetingStartDate1.$dirty) && editForm.meetingStartDate1.$error.required">
            必填
          </span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label"><b>*</b>会议地点：</div>
          <div class="right-value">
            <input type="text" name="meetingPlace" required 
              ng-model="meetingDetail.editMeetingList.meetingPlace" />
          </div>
          <span class="error-tip"
            ng-show="(editForm.$submitted || editForm.meetingPlace.$dirty) && editForm.meetingPlace.$error.required">
            必填
          </span>
        </div>
        <div class="row-item">
          <div class="fixed-left-label">主持人：</div>
          <div class="right-value">
            <input type="text" ng-model="meetingDetail.editMeetingList.host" />
          </div>
        </div>
        <div class="row-item">
          <div class="fixed-left-label">参加人员：</div>
          <div class="right-value">
            <input type="text" name="participants"
            ng-model="meetingDetail.editMeetingList.participants" />
          </div>
        </div>
        <!-- 上传文件 -->
        <common-attachment-upload
          component-id="cp2"
          file-type="file"
          pick-btn-id="avatar_attachment_picker"
          upload-url="{{fileUploadUrl.securityMeeting}}"
          file-list="meetingDetail.editMeetingList.fileBeanList"></common-attachment-upload>
      </form>
    </div>
    <div class="item-detail-dialog-footer">
      <a class="pa-btn"
        authorization-btn="api/securityactivities/securityMeeting/updateSecurityMeeting"
        ng-click="meetingDetail.save(editForm)">
        <i class="fa fa-save"></i>
        <span>修改</span>
      </a>
      <a class="pa-btn" ng-click="closeThisDialog()">
        <i class="fa fa-times"></i>
        <span>取消</span>
      </a>
    </div>
  </div>
</script>